<!-- Copyright (c) 2022 渝州大数据实验室
 *
 * Lanius is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *
 *     http://license.coscl.org.cn/MulanPSL2
 *
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 -->
<!-- 
* @desc:我的消息页面
* @fileName:Message.vue
* @author:zoujunjie@yzbdl.ac.cn
* @date:2022-05-25
!-->

<template>
  <div class="container">
    <div
      class="title-container flex align-items-center justify-content-space-between"
    >
      <div class="title">{{ $route.name }}</div>
      <div class="operation-container flex align-items-center">
        <el-date-picker
          class="item grey input-date"
          v-model="filter.date"
          type="daterange"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
        <el-input
          class="item grey input-keyword"
          placeholder="请输入关键字"
          v-model="filter.keyword"
          clearable
          :prefix-icon="Search"
        ></el-input>
        <el-button class="item" type="primary" :icon="CircleCheck"
          >编辑本页为已读</el-button
        >
        <DialogBanType></DialogBanType>
        <el-button class="item" type="primary" :icon="Brush"
          >清空消息</el-button
        >
      </div>
    </div>
    <div class="filter-container flex align-items-center">
      消息状态：
      <el-radio-group v-model="filter.status">
        <el-radio-button label="全部"></el-radio-button>
        <el-radio-button label="未读"></el-radio-button>
        <el-radio-button label="已读"></el-radio-button>
      </el-radio-group>

      消息类型：
      <el-radio-group v-model="filter.type">
        <el-radio-button label="全部"></el-radio-button>
        <el-radio-button label="通知"></el-radio-button>
        <el-radio-button label="告警"></el-radio-button>
      </el-radio-group>
    </div>
    <div class="list-container">
      <div class="item flex align-items-center">
        <div class="icon-container">
          <lanius-icon
            :has-border="true"
            :is-circle-border="true"
            color="primary"
            :size="17"
            :width="31"
            backgroundColor="white"
          >
            <BellFilled></BellFilled>
          </lanius-icon>
        </div>
        <div class="content text-ellipsis-2">
          食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务任务食药环案侦数据采集任务
          于2022/5/9 8：00 执行失败，并且该任务
          已经连续3次执行失败，请及时处理！
        </div>
        <div class="date">5分钟前</div>
      </div>
      <div class="item flex align-items-center">
        <div class="icon-container">
          <lanius-icon
            :has-border="true"
            :is-circle-border="true"
            color="warning"
            :size="17"
            :width="31"
            backgroundColor="white"
          >
            <WarningFilled></WarningFilled>
          </lanius-icon>
        </div>
        <div class="content text-ellipsis-2">
          食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务任务食药环案侦数据采集任务
          于2022/5/9 8：00 执行失败，并且该任务
          已经连续3次执行失败，请及时处理！
        </div>
        <div class="date">5分钟前</div>
      </div>
      <div class="item flex align-items-center">
        <div class="icon-container">
          <lanius-icon
            :has-border="true"
            :is-circle-border="true"
            color="default"
            :size="17"
            :width="31"
            backgroundColor="white"
          >
            <BellFilled></BellFilled>
          </lanius-icon>
        </div>
        <div class="content text-ellipsis-2">
          食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务食药环案侦数据采集任务任务食药环案侦数据采集任务
          于2022/5/9 8：00 执行失败，并且该任务
          已经连续3次执行失败，请及时处理！
        </div>
        <div class="date">5分钟前</div>
      </div>
    </div>
    <div class="footer-container">
      <Pagination :pageSize="10" :total="20"></Pagination>
    </div>
  </div>
</template>

<script lang="ts" setup>
import DialogBanType from "./components/DialogBanType.vue";
import { onMounted, ref } from "vue";
import {
  Search,
  CircleCheck,
  Filter,
  Brush,
  BellFilled,
  WarningFilled,
} from "@element-plus/icons-vue";

let filter = ref({
  keyword: "",
  date: [],
  status: "全部",
  type: "全部",
});

onMounted(() => {
  console.log(123);
});
</script>

<style lang="scss" scoped>
.container {
  background-color: white;
  padding: 20px;
  height: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  .title-container {
    height: 30px;
    .operation-container {
      .item {
        margin-left: 20px;
      }
      .input-keyword {
        width: 200px;
      }
      .input-date {
        width: 220px;
      }
    }
  }
  .filter-container {
    background-color: #fafafa;
    height: 50px;
    margin-top: 20px;
  }

  .list-container {
    flex: auto;
    .item {
      height: 60px;
      background-color: #fafafa;
      margin-top: 10px;
      .icon-container {
        width: 88px;
        display: flex;
        flex-direction: column;
        align-items: center;
      }
      .content {
        flex: auto;
        font-weight: 700;
        color: black;
        font-size: 14px;
        line-height: 20px;
        max-width: 1220px;
      }
      .date {
        color: #000000;
        font-size: 14px;
        width: 190px;
        padding-left: 100px;
      }
    }
    .item:hover {
      background-color: #f1f1f1;
    }
  }
}
</style>

<style lang="scss">
.container {
  .title-container {
    .operation-container {
      .input-date {
        width: 220px;
      }
    }
  }
}
</style>
